<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: shanpengfei
  Date: 2019/2/28
  Time: 5:58 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="basePath" value="/gyp"></c:set>

<jsp:include page="../template_header.jsp"></jsp:include>

<div class="register-form">
    <form action="${basePath}/teach/add" method="post">
        <input type="hidden" name="id" value="${teach.id}"><br>
        <input type="hidden" name="userId" value="${teach.userId}"><br>
        <%--<input type="number" name="type" value="${teach.type}" min="1" max="4" placeholder="教程类型，1：雕刻，2：瓷器，3：编制品，4：其他"><br>--%>
        <select name="type" class="i2s-num">
            <c:if test="${teach.type==1}">
                <option value="1" selected>雕刻</option>
                <option value="2">瓷器</option>
                <option value="3">编制品</option>
                <option value="4">其他</option>
            </c:if>
            <c:if test="${teach.type==2}">
                <option value="1">雕刻</option>
                <option value="2" selected>瓷器</option>
                <option value="3">编制品</option>
                <option value="4">其他</option>
            </c:if>
            <c:if test="${teach.type==3}">
                <option value="1">雕刻</option>
                <option value="2">瓷器</option>
                <option value="3" selected>编制品</option>
                <option value="4">其他</option>
            </c:if>
            <c:if test="${teach.type==4}">
                <option value="1">雕刻</option>
                <option value="2">瓷器</option>
                <option value="3">编制品</option>
                <option value="4" selected>其他</option>
            </c:if>
            <c:if test="${teach.type==null}">
                <option value="1">雕刻</option>
                <option value="2">瓷器</option>
                <option value="3">编制品</option>
                <option value="4">其他</option>
            </c:if>
        </select>
        <input type="text" name="title" value="${teach.title}" placeholder="教程标题"><br>
        <%--<c:if test="${teach.id == null}">--%>
            <div id="container">
                <a class="btn btn-default btn-lg " id="pickfiles" href="#" >
                    <span>上传教程图片，请选择文件</span>
                </a>
            </div>
            <input id="urlText" name="pic" type="hidden" value="${teach.pic}"></input>
        <%--</c:if>--%>
        <textarea name="content" placeholder="教程介绍" rows="7" cols="77">${teach.content}</textarea>
        <input type="submit" value="分享">
    </form>
</div>

<jsp:include page="../template_footer.jsp"></jsp:include>

<script src="${basePath}/js/qiniu.js"></script>
